#ifndef GSUPPORT_H
#define GSUPPORT_H

#include<QObject>
#include<QString>
#include<QDataStream>
#include<QStringList>

#include<vector>
#include<string>
#include<cstring>

#include<iostream>

using namespace std;

/*!	\brief This class contains error codes and their text representations
 *	
 *	This class is used to commuicate some status from a login request
 *	and various other requests.
 *	
*/
class GResponse {
public:
	GResponse();
	
	/*!	\brief Initialize with an error code.
	 *
	 *@param in The errorcode to initialize the object with.
	*/
	GResponse(int in);
	
	/*!	\brief Get errorcode as a std::string.
	*/
	string getString();
	
	/*!	\brief Get errorcode as a QString.
	*/
	QString getServerString();
	
	/*!	\brief Get the numberical errorcode.
	*/
	int msgCode();
	
	/*!	Set the numberical errorcode.
	 *
	 *@param in The errorcode to set.
	*/
	void setMsgCode(int in);
	
	enum GErrorCode {
		enone,
		
		//GLogin codes
		eloginpassword,
		ealreadyloggedin,
		eaccountdoesnotexist,
		eaccountalreadyexists,
		echaracters,
		estringlimit,
		eusernotonline,
		enotloggedin,
		etransferstopped,
		everified,
		enotverified,
		ebadverification,
		einvalidpacket
		
		
	};
	
	
private:
	int c;
	
};

#endif // GSUPPORT_H
